﻿using DtoFw.Interface;
using System;
using System.Collections.Generic;
using System.Text;

namespace DtoFw.DataStandardApi
{
    /// <summary>
    /// 天地伟业执法办案管理中心信息系统数据标准
    /// </summary>
    public class ResultEntity<T>
    {
        /// <summary>
        /// 接口返回数据，以实际接口为准
        /// </summary>
        public T content { get; set; }
        /// <summary>
        /// 数据条数，分页查询时生效
        /// </summary>
        public int count { get; set; }
        /// <summary>
        /// 状态码，
        /// 成功=API-COMMON-INF-OK
        /// 失败=API-COMMON-ERR-ERROR，API-COMMON-ERR-PARAM，API-COMMON-ERR-DB-EXCEPTION
        /// </summary>
        public string statusCode { get; set; }
        /// <summary>
        /// 返回消息,包含成功和失败消息
        /// </summary>
        public string statusMessage { get; set; }

        public bool Success
        {
            get
            {
                return this.statusCode == "API-COMMON-INF-OK";
            }
        }

    }
}
